package de.pelizaeus.app;



import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;


public class BilderFragment extends Fragment implements View.OnClickListener{
    
    public BilderFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
    }
    

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View rootView = inflater.inflate(R.layout.fragment_bilder, container, false);
        ImageView image = null;
        image = (ImageView) rootView.findViewById(R.id.imageView);
        image.setOnClickListener(this);
        image = (ImageView) rootView.findViewById(R.id.imageView2);
        image.setOnClickListener(this);
        image = (ImageView) rootView.findViewById(R.id.imageView3);
        image.setOnClickListener(this);
        image = (ImageView) rootView.findViewById(R.id.imageView4);
        image.setOnClickListener(this);
        image = (ImageView) rootView.findViewById(R.id.imageView5);
        image.setOnClickListener(this);
        image = (ImageView) rootView.findViewById(R.id.imageView6);
        image.setOnClickListener(this);
        return rootView;
    }


    @Override
    public void onClick(View view) {
        switch (view.getId())
        {
            case R.id.imageView:
                Toast.makeText(getActivity(), "Bild 1 gedrückt", Toast.LENGTH_SHORT).show();
                break;
            case R.id.imageView2:
                Toast.makeText(getActivity(), "Bild 2 gedrückt",Toast.LENGTH_SHORT).show();
                break;
            case R.id.imageView3:
                Toast.makeText(getActivity(), "Bild 3 gedrückt",Toast.LENGTH_SHORT).show();
                break;
            case R.id.imageView4:
                Toast.makeText(getActivity(), "Bild 4 gedrückt",Toast.LENGTH_SHORT).show();
                break;
            case R.id.imageView5:
                Toast.makeText(getActivity(), "Bild 5 gedrückt",Toast.LENGTH_SHORT).show();
                break;
            case R.id.imageView6:
                Toast.makeText(getActivity(), "Bild 6 gedrückt",Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
